<?php
/************************************************************\
*
*		watercap plugin for securityimages
*       Copyright 2007 Walter Cedric
*		www.waltercedric.com
*
*    This file is part of securityimages.
*	
*	this plugin use the GPL engine HN Captcha php class (see http://www.phpclasses.org/browse/package/1569.html).
*	 
*    securityimages is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    securityimages is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with freeCap; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*
\************************************************************/
defined( '_JEXEC' ) or die( 'Restricted access' );

JLoader::import('watercap', dirname( __FILE__ ));

require_once (JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_securityimages'.DS.'pluginsA'.DS.'watercap'.DS.'1.0'.DS.'config.php');

$session = &JFactory::getSession();

$captcha = & new securityimagesWaterCap();
$session->set('publicKey', $captcha->public_K);
$session->set('hnkey', $captcha->key);
$session->set('privateKey', $captcha->private_K);

$captcha->waterCap(null,$width='250', $height='60');
?>